﻿using System;
using System.ComponentModel;
using System.Data;
using ReflectionStudio.Core.Events;
using System.Windows;
namespace WPFExcelReport
{
    /// <summary>
    /// Interaction logic for EditEventWindow.xaml
    /// </summary>
    public partial class TWDTYP
    {
        public TWDTYP()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VWDECK();
            this.DataContext = MV;
            WDTYP = "B";
            InitializeComponent();
        }
        public override void OnEXAUFChg(string vlaue)
        {
            IsWZ = false;
            TBMain.Clear();
            if (EXAUF.Length < 14)
                return;
            string wdsa = EXAUF.Substring(0, 1);
            dwData = TBMain.NewRow();
            dwData["WDMANDANT"] = app.Mandant;
            dwData["WDSA"] = "V";
            dwData["WDTYP"] = WDTYP;
            dwData["WDAUFKRS"] = EXAUF.Substring(0, 2);
            dwData["WDAUFLFD"] = EXAUF.Substring(2, 6);
            dwData["WDAUFPOS"] = EXAUF.Substring(8, 3);
            SResult = TMV.QWD23(dwData);
            MergeData(SResult, true);
            base.OnEXAUFChg(vlaue);
        }

        private void WZAlloctionCommand(object sender, RoutedEventArgs e)
        {
            IsWZ = false;
            IsWZ = true;
        }
    }
}
